import request from '@/utils/request'
// 患者代缴费列表
export function getPayMentList(data) {
	return request({
		url: '/project/patientBase/getPayMentList',
		method: 'post',
		params: data
	})
}
// 患者微信、支付宝扫码支付代缴费列表
export function getPayMentListSmf(data) {
	return request({
		url: '/project/patientBase/getPayMentListSmf',
		method: 'post',
		params: data
	})
}

// 微信统一下单
export function payUnifiedOrder(data) {
	return request({
		url: '/pay/unifiedOrder',
		method: 'post',
		data: data
	})
}
// 患者预约信息查询
export function getReservationList(data) {
	return request({
		url: '/project/reservation/list',
		method: 'get',
		params: data
	})
}
// 患者预约挂号保存
export function reservation(data) {
	return request({
		url: '/project/reservation',
		method: 'post',
		data: data
	})
}
// 患者取消预约挂号保存
export function cancelReservation(data) {
	return request({
		url: '/project/reservation',
		method: 'put',
		data: data
	})
}
// 验证预约是否超时
export function checkReservation(data) {
	return request({
		url: '/project/reservation/checkReservation/' + data,
		method: 'get',
	})
}
/* 当班挂号校验 */
export function checkReservationToday(data) {
	return request({
		url: '/project/patientBase/payReservationCheck',
		method: 'post',
		params:data
	})
}
// 缴费详情列表查询
export function getPayMentDetailList(data) {
  return request({
    url: '/project/patientBase/getPayMentDetailList',
    method: 'post',
	params:data
  })
}

//缴费记录列表
export function getOutpatientPayMentList(data) {
  return request({
    url: '/project/patientBase/getOutpatientPayMentList',
    method: 'post',
	params:data
  })
}

//处方支付前校验
export function checkOutpatientPayment(data) {
  return request({
    url: '/project/patientBase/checkOutpatientPayment',
    method: 'post',
	params:data
  })
}

//住院押金缴纳记录
export function getDepositRecord(data) {
  return request({
    url: '/project/patientBase/getDepositRecord',
    method: 'post',
	params:data
  })
}

// *********************医保支付相关************************

// 1 获取微信医保js相关配置
export function getYBAuthConfig(data) {
	return request({
		url: '/pay/getYBAuthConfig',
		method: 'get',
		params: data
	})
}

// 2 获取信息服务接口
export function userQuery(data) {
	return request({
		url: '/pay/userQuery',
		method: 'get',
		params: data
	})
}

// 3 费用明细上传
export function uldFeeInfoWX(data) {
  return request({
    url: '/pay/uldFeeInfoWX',
    method: 'post',
	data:data
  })
}

// 4 微信医保统一下单请求
export function ybUnifiedOrder(data) {
  return request({
    url: '/pay/ybUnifiedOrder',
    method: 'post',
	data:data
  })
}

// 5 支付成功后获取订单详情
export function getOrderByOpenId(data) {
	return request({
		url: '/project/order/getOrderByOpenId',
		method: 'get',
		params: data
	})
}

//门诊缴费电子发票查看
export function getOutpatientElectBill(data) {
  return request({
    url: '/project/patientBase/getOutpatientElectBill',
    method: 'post',
	params:data
  })
}

// ***************** 支付宝扫码支付相关 **********************

// 患者信息有效性查询
export function checkYKT(data) {
	return request({
		url: '/project/scanPay/checkYKT',
		method: 'get',
		params: data
	})
}

// 查询患者信息openid
export function getAccessTokenZfb(data) {
	return request({
		url: '/pay/getAccessTokenZfb',
		method: 'get',
		params: data
	})
}

// 支付宝统一下单获取订单号
export function createOrderZfb(data) {
  return request({
    url: '/pay/createOrderZfb',
    method: 'post',
	data:data
  })
}




